package lab02.test28;

import java.util.InputMismatchException;
import java.util.Scanner;

/**
 * Created by lenovo on 2017/11/19.
 */
public class Test {
    public static void main(String[] args) {
        Scanner scanner=new Scanner(System.in);
        System.out.println("请输入圆的半径:");
        try {
            double r=scanner.nextDouble();
            System.out.println("圆的面积为："+Math.PI*r*r);
        }
        catch (InputMismatchException e){
            System.out.println("半径不为double型");
        }


    }
}
